import request from '@/utils/request'

// 查询数据资源列表
export function listDataSource(query) {
  return request({
    url: '/backstage/DataManage/list',
    method: 'get',
    params: query
  })
}

// 查询数据资源详细
export function getDataSource(cResourceId) {
  return request({
    url: '/backstage/DataManage/' + cResourceId,
    method: 'get'
  })
}

// 新增数据资源
export function addDataSource(data) {
  return request({
    url: '/backstage/DataManage',
    method: 'post',
    data: data
  })
}

// 修改数据资源
export function updateDataSource(data) {
  return request({
    url: '/backstage/DataManage',
    method: 'put',
    data: data
  })
}

// 删除数据资源
export function delDataSource(cResourceId) {
  return request({
    url: '/backstage/DataManage/' + cResourceId,
    method: 'delete'
  })
}
